<template>
  <div class="swiper-container">
    <div class="swiper-wrapper">
      <div class="swiper-slide"></div>
    </div>

    <div class="swiper-pagination"></div>
  </div>
</template>

<script>
import Swiper from "swiper";
import "swiper/css/swiper.min.css";
export default {
  name: "Swiper",
  mounted() {
    new Swiper(".swiper-container", {
      slidesPerView: 5,
      spaceBetween: 10,
      slidesPerGroup: 5,
      // init: false,
      pagination: {
        el: ".swiper-pagination",
        clickable: true,
      },
    });
    // console.log(swiper);
  },

  data: function () {
    var arr = [];
    arr = JSON.parse(JSON.stringify(this.jiangpingList)); //this.templateData是父组件传递的对象
    return arr;
  },
    
};
</script>

<style lang="less" scoped>
/* .swiper-container {
  width: 100%;
  height: 100%;
}
.swiper-wrapper {
  padding-bottom: 40px;
}
.swiper-slide {
  height: 300px;
  text-align: center;
  font-size: 18px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  a.itemLink {
    position: relative;
    width: 100%;
    height: 100%;
    text-decoration: none;
    .recommendImg {
      width: 140px;
      height: 140px;
      margin-top: 40px;
    }
    .recommendName {
      margin: 0 10px 10px;
      height: 18px;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
      color: #333;
      font-size: 14px;
    }
    .recommendPrice {
      margin-bottom: 10px;
      color: #ff6700;
      font-size: 14px;
    }
    .recommendTips {
      position: relative;
      color: #757575;
      font-size: 14px;
      .recommendBtn {
        width: 100px;
        height: 25px;
        line-height: 25px;
        position: absolute;
        top: 60px;
        left: 70px;
        display: none;
        border: 1px solid #757575;
      }
      &:hover .recommendBtn {
        position: absolute;
        display: block;
        top: 0px;
        background-color: #ff6700;
        color: white;
        border: none;
        transition: all 1s;
      }
    }
  }
  a.itemLink:hover .recommendBtn {
    position: absolute;
    display: block;
    top: 0px;
    border: 1px solid #ff6700;
    background-color: #fff;
    color: #ff6700;
    transition: all 1s;
  }
} */
</style>
